/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package EntidadesDBPrueba;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Facundo
 */
@Entity
@Table(name = "tipodoc", catalog = "tpare", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tipodoc.findAll", query = "SELECT t FROM Tipodoc t"),
    @NamedQuery(name = "Tipodoc.findByNombreTipoDoc", query = "SELECT t FROM Tipodoc t WHERE t.nombreTipoDoc = :nombreTipoDoc")})
public class Tipodoc implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 20)
    @Column(name = "nombreTipoDoc", nullable = false, length = 20)
    private String nombreTipoDoc;

    public Tipodoc() {
    }

    public Tipodoc(String nombreTipoDoc) {
        this.nombreTipoDoc = nombreTipoDoc;
    }

    public String getNombreTipoDoc() {
        return nombreTipoDoc;
    }

    public void setNombreTipoDoc(String nombreTipoDoc) {
        this.nombreTipoDoc = nombreTipoDoc;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nombreTipoDoc != null ? nombreTipoDoc.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tipodoc)) {
            return false;
        }
        Tipodoc other = (Tipodoc) object;
        if ((this.nombreTipoDoc == null && other.nombreTipoDoc != null) || (this.nombreTipoDoc != null && !this.nombreTipoDoc.equals(other.nombreTipoDoc))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "EntidadesDBPrueba.Tipodoc[ nombreTipoDoc=" + nombreTipoDoc + " ]";
    }
    
}
